<?php

include($_SERVER['DOCUMENT_ROOT']."/headerFrame.php");

echo'
<div id="contextCaption">Создание заказа.</div>
<div id="insert_response"></div>
<hr>
<!--<form action="javascript:Request('."'".'Order'."'".', '."'".'create'."'".', '."'".''."'".')" method="POST">-->
<form>
    <table border="0" id="contextGrid" cellspacing="0">
        <tr><td><label for="Description">Заголовок</label><input type="text"    id="Description" ></td></tr>
		<tr><td><label for="UserID">Продавец</label><input type="text" value="Нурпиисов"   id="UserID" ></td></tr>
		<tr><td><label for="UserIDTo">Покупатель</label>
					<select id="userIDTo">
';
?>

						<?php
							$con = mysql_connect("localhost","root","555");
							mysql_select_db("mlm", $con);
								$result = mysql_query("
									SELECT 
										Id, lastname
									FROM users");
								
								$rows = array();
								while($row = mysql_fetch_array($result)){
								   echo "<option value=".$row['Id'].">".$row['lastname']."</option>";  
								}
						?>
<?php

echo '
					</select>	
		</td></tr>

    </table>
    <hr>
	<div id="orderline" height=100% style="margin: 0px; padding: 0px;"></div>
	
	<div id="result"><div>
	
	<input id="button" type="Button"  value="Отмена" title="Отмена" onclick="getPage('."'".'/core/Order/OrderView.html'."'".')">            
	
	<input id="button" type="Button" value="Сохранить" title="Сохранить введенные данные" onclick="Request('."'".'Order'."'".', '."'".'create'."'".', '."'".''."'".')" >
</form>
';
?>
